/** \file    bilinear.h
  * \brief   Bilinear interpolation of various image concerning objects.
  * \date    2001
  * \author  Fedor Chelnokov
  * \version $Header: /home/cscom1r4/cvsroot/cs/include/imglib/bilinear.h,v 1.2 2004/12/10 05:10:44 cscom1r4 Exp $
  */

#ifndef _bilinear_h_
#define _bilinear_h_

#include "xtd/Arr2D.h"
#include "typelib/types.h"
#include "cmmtype.h"
#include "Arr2Dimg.h"
#include "type.h"

namespace img {

class bitmap;

///bilinear interpolates in the map values of four nearest points to the given ones in Places  
///overwrites map with interpolation result
void bilinearMap( const PntArr2f &mapPlaces, PntArr2f &map, float reservedMapValue );

///replaces some pixels in background image with interpolated colors from initial image taken in the given places
void bilinearImage( 
	AImage &background, bitmap &replace, const PntArr2f &places, const int_point &bDispl,
	const AImage &initial, const int_point &iDispl,
	const bRGB &noValue, bool interpolate, bool noNoValue );

} //namespace img

#endif //_bilinear_h_
